package com.glowdayz.glowmee;

import com.glowdayz.common.ActivityManager;
import com.glowdayz.common.ImageDownloader;

import android.os.Bundle;
import android.widget.ImageView;
import android.app.Activity;
import android.content.Intent;

public class ViewProductImg extends Activity {
	
	private ActivityManager am = ActivityManager.getInstance();
	
	ImageView productImg = null;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_view_product_img);
		
		am.addActivity(this);
		
		Intent fromIntent = getIntent();
		String productImage = fromIntent.getStringExtra("PARAM_img");
		
		productImg = (ImageView) findViewById(R.id.productImg);
		ImageDownloader.getInstance().download(getResources().getString(R.string.server_url) + productImage, productImg);
	}
	
    @Override
	protected void onDestroy() {
		super.onDestroy();
		am.removeActivity(this);
	}
}
